package com.woniu.microcommunityserver.advert.service.impl;

import com.woniu.microcommunityserver.advert.entity.AdvertSlideshowInfoEntity;
import com.woniu.microcommunityserver.advert.mapper.AdvertSlideshowInfoMapper;
import com.woniu.microcommunityserver.advert.service.AdvertSlideshowInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class AdvertSlideshowInfoServiceImpl implements AdvertSlideshowInfoService {
    @Resource
    private AdvertSlideshowInfoMapper advertSlideshowInfoMapper;

    @Override
    public List<AdvertSlideshowInfoEntity> find() {
        List<AdvertSlideshowInfoEntity> advert = advertSlideshowInfoMapper.find();
        return advert;
    }

    @Override
    public List<AdvertSlideshowInfoEntity> findByState(Integer slideshowState) {
        return advertSlideshowInfoMapper.findByState(slideshowState);
    }

    @Override
    public boolean updateStateById(Integer slideshowState, Long id) {
        return advertSlideshowInfoMapper.updateStateById(slideshowState,id);
    }

    @Override
    public boolean insertAdvert(AdvertSlideshowInfoEntity advertSlideshowInfoEntity) {
        return advertSlideshowInfoMapper.insertAdvert(advertSlideshowInfoEntity);
    }

}
